package com.ruoyi.hospital.domain;

import com.ruoyi.common.core.domain.BaseEntity;

public class BaseQuery extends BaseEntity {

    private Integer pageSize;
    private Integer currentPage;
    private String keyword;

    public BaseQuery(Integer pageSize, Integer currentPage, String keyword) {
        this.pageSize = pageSize;
        this.currentPage = currentPage;
        this.keyword = keyword;
    }
    public BaseQuery() {
    }

    public Integer getStart(){
        return (this.currentPage-1)*(this.pageSize);
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    @Override
    public String toString() {
        return "BaseQuery{" +
                "pageSize=" + pageSize +
                ", currentPage=" + currentPage +
                ", keyword='" + keyword + '\'' +
                '}';
    }
}
